<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <title>开麦-{$wxData.nickname}</title>
        <link rel="stylesheet" href="./Public/frozenui/css/frozen.css">
        <script src="./Public/frozenui/js/lib/zeptojs/zepto.min.js"></script>
        <script src="./Public/frozenui/js/frozen.js"></script>
        <script src="./Public/timeFormat.js"></script>
        <link rel="stylesheet" type="text/css" href="./Public/DateTime/dist/DateTimePicker.css" />
        <script src="./Public/jquery.min.js"></script>
        <script type="text/javascript" src="./Public/DateTime/dist/DateTimePicker.js"></script>
        <script src="./Public/pcSelect/jquery.cxselect.js"></script>
        <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
        <link rel="stylesheet" href="./Public/global.css">
        <style>
            label{color: #ff90b7;}
            .pics li{list-style: none; float: left; width: 88px;height: 88px;border:#e9e9e9 1px solid; margin: 5px; padding: 0px; overflow: hidden;
            text-height: 103px; background-color: white;}
            .pics .add{background-image: url('./Public/Kmic/picAdd.jpg'); background-repeat: no-repeat; background-position: center; background-size: 50px 50px;}
            .file input {
                /*position: absolute;*/
                font-size: 100px;
/*                right: 0;
                top: 0;*/
                opacity: 0;
                width: 103px; height: 103px;
            }
            .file:hover {
                background: #AADFFD;
                border-color: #78C3F3;
                color: #004974;
                text-decoration: none;
            }
            .tag li{margin-right: 3px;}
/*            .selected{background-color: #ff629a; }*/
            .pics .delete{position: absolute; }
            
            /*.video {width: 1}*/
            .video{ padding: 10px 0px;}
            .video li{list-style: none; float: left; width: 68px;height: 68px; margin: 5px; padding: 0px; overflow: hidden;
            text-height: 68px; background-color: white;
            background-image: url('./Public/Kmic/video.png'); background-repeat: no-repeat; background-position: center; background-size: 68px 68px;}
            .video .delete{position: absolute; }
            .video .content{width: 68px;height: 68px;}
            
            body{font-family:"Microsoft YaHei",微软雅黑; font-size: 14px; background-color: #e9e9e9;}
            input,textarea,label{ font-size: 14px;}
            .pic_user{padding:  15px; margin-bottom: 10px; background-color: #FFF;}
            .cl{ clear: both; height: 0px; overflow: hidden;}
            .sex_info{ background-color: #fea5b9; color: #FFF; float: left; border-radius:3px; padding: 0px 8px; max-height: 20px;  margin: 5px 0px 0px 0px; text-align: center; text-shadow: none; font-size: 14px;  }
            .zc_name{ float: left; font-weight: bold; margin: 3px 8px 8px 0px;}
            .bgw .selected{background-color:white; border:#ff629a 1px solid; color: #ff629a; font-size: 14px; line-height: 24px; height: 24px;}
            .bgw{ background-color: #FFF; margin-bottom: 10px; padding:0px 15px;}
            .bgw .ui-form-item{ padding: 0px;}
            .bgw label{ color: #999999;}
            .bgw .ui-input-wrap{ background-color: inherit;}
            .title{ font-size: 16px; background-color: #FFF; padding: 12px 0px; color: #999999; }
            .title .title_biao{ background-color: #fea5b9; width: 5px; height: 18px; border-radius: 2px; float: left; margin: 3px 8px 0px 8px; }
            .ly_button{ background-color: #ff629a; font-size: 15px; color: #FFF; border-radius: 3px; text-align: center; padding: 4px 10px; }
        </style>
        <script type="text/javascript">
            wx.config({
                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                appId: 'wxf20953cc201449dd', // 必填，公众号的唯一标识
                timestamp: '{$Think.session.timestamp}', // 必填，生成签名的时间戳
                nonceStr: '{$Think.session.nonceStr}', // 必填，生成签名的随机串
                signature: '{$signature}',// 必填，签名，见附录1
                jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone','previewImage','checkJsApi'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
            });
            
            function share(title,link,imgUrl){
                wx.ready(function(){
                    wx.onMenuShareTimeline({
                        title: title, // 分享标题
                        link: link, // 分享链接,将当前登录用户转为puid,以便于发展下线
                        imgUrl: imgUrl, // 分享图标
                        success: function () { 
                            // 用户确认分享后执行的回调函数
                        },
                        cancel: function () { 
                            // 用户取消分享后执行的回调函数
                        },
                        trigger: function (res) {
//                            alert("分享到朋友圈按钮点击");        
                        },
                        fail: function (res) {
//                            alert(JSON.stringify(res));
                        }
                    });
                    
                    wx.onMenuShareAppMessage({
                        title: title, // 分享标题
                        desc: title, // 分享描述
                        link: link, // 分享链接
                        imgUrl: imgUrl, // 分享图标
                        type: 'link', // 分享类型,music、video或link，不填默认为link
                        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                        success: function () { 
                            // 用户确认分享后执行的回调函数
                        },
                        cancel: function () { 
                            // 用户取消分享后执行的回调函数
                        }
                    });
                    
                    wx.onMenuShareQQ({
                        title: title, // 分享标题
                        desc: title, // 分享描述
                        link: link, // 分享链接
                        imgUrl: imgUrl, // 分享图标
                        success: function () { 
                           // 用户确认分享后执行的回调函数
                        },
                        cancel: function () { 
                           // 用户取消分享后执行的回调函数
                        }
                    });
                    
                    wx.onMenuShareWeibo({
                        title: title, // 分享标题
                        desc: title, // 分享描述
                        link: link, // 分享链接
                        imgUrl: imgUrl, // 分享图标
                        success: function () { 
                           // 用户确认分享后执行的回调函数
                        },
                        cancel: function () { 
                            // 用户取消分享后执行的回调函数
                        }
                    });
                    wx.onMenuShareQZone({
                        title: title, // 分享标题
                        desc: title, // 分享描述
                        link: link, // 分享链接
                        imgUrl: imgUrl, // 分享图标
                        success: function () { 
                           // 用户确认分享后执行的回调函数
                        },
                        cancel: function () { 
                            // 用户取消分享后执行的回调函数
                        }
                    });
                });
                wx.error(function(res){
//                    console.log(res);
//                    alert(JSON.stringify(res));
                });
            }
            share('{$list.title}','http://'+window.location.host+'/?m=web&a=artistProfiles&uid={$myPrifile.uid}','http://'+window.location.host+'{$thumbnail}');



        </script>
    </head>
    <body ontouchstart="">
<!--        <header class="ui-header ui-border-b" style="background-color: white;">
            <h1>{$wxData.nickname}的主页</h1>
        </header>-->
        <div id="dtBox"></div>
        <section class="ui-container">
            <div class=" ui-border-t">
                
                <form role="form" method="post" name="dosubmit" id="dosubmit">
                    <div class="ui-form-item ui-border-b" style=" height: 190px; background-color:deeppink; margin: 0px; padding: 0px; ">
                        <div style="padding:  10px; height: 170px; background-image: url({$pics.0}); background-repeat: no-repeat; background-size: 100% auto;">
                            
                        </div>
                        
                    </div>
                    <div class="pic_user">
                        <div style="position: absolute; left: 55px; margin: 0px 0px 0px 0px; text-align: right; background-color: #fea5b9;  border-radius: 8px;  color: #FFF;">
                                <if condition="$myPrifile.level eq 10">
                                    <div style="width: 20px;
                                         text-align:center; font-size: 12px; background-position:0px 14px; font-weight: bold; ">V</div>
                                </if>
                            </div>
                            <div class="ui-avatar" style=" padding: 3px; margin: 0px 15px 0px 0px; float: left;">
                                <span style="background-image:url({$wxData.headimgurl})"></span>
                            </div>
                        <div style="color: #ff90b7; float: left; color:#333; "><div class="zc_name">{$myPrifile.name}</div>
                            <div class="sex_info"><if condition="$myPrifile.sex eq 1">男<else/>女</if> <if condition="$myPrifile.age eq 0">保密<else/>{$myPrifile.age}</if></div>
                            <div class="cl"></div>
                            <gt name="myPrifile.constellation|strlen" value="0">
                            {$myPrifile.constellation}</gt></div>
                        <div class="cl"></div>
                    </div>
                    
                    <notempty name='voice'>
                        <div class="ui-form-item ui-border-b" style=" height: 45px; margin-top: 10px;text-align: center;">
                            <audio controls="controls" >
                                <source src="{$voice}" type="audio/mp3"></source>
                            </audio>
                        </div>
                    <div class="clean"></div>
                    </notempty>
                    <div class="title ui-border-b"><div class="title_biao"></div>详细资料</div>
                    <div class="bgw">                        
                    <div class="ui-form-item ui-border-b element_id" >
                        <label>所在地</label>
                        <input type="text" value="{$myPrifile.province} {$myPrifile.city} {$myPrifile.area}" readonly="">
                        
                    </div>
                    
                    
                    
                    
                    <gt name="myPrifile.stature|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            身高/CM
                        </label>
                        <input type="text" placeholder="单位CM" value="{$myPrifile.stature}" name="stature" readonly>
                    </div>
                    </gt>
                    
                    <div class="ui-form-item ui-border-b">
                        <label>
                            擅长语言
                        </label>
                    </div>
                    <div class="ui-form-item ui-border-b" style='height: auto;'>
                        <div >
                            <ul class='tag language'>
                                <li class="ui-label selected" <empty name="language.0">style='display: none;'</empty>>普通话</li>
                                <li class="ui-label selected" <empty name="language.1">style='display: none;'</empty>>粤语</li>
                                <li class="ui-label selected" <empty name="language.2">style='display: none;'</empty>>英语</li>
                                <li class="ui-label selected" <empty name="language.3">style='display: none;'</empty>>日语</li>
                                <li class="ui-label selected" <empty name="language.4">style='display: none;'</empty>>韩语</li>
                                <li class="ui-label selected" <empty name="language.5">style='display: none;'</empty>>法语</li>
                                <li class="ui-label selected" <empty name="language.6">style='display: none;'</empty>>其他</li>
                            </ul>
                            <div id="clear"></div>
                        </div>
                    </div>
                    
                    
                    <div class="ui-form-item ui-border-b" >
                        <label>
                            行业偏向
                        </label>
                    </div>
                    
                    <div class="ui-form-item ui-border-b" style='height: auto;'>
                        <div>
                            <ul class='tag industry'>
                                <li class="ui-label selected" <empty name="industry.0">style='display: none;'</empty>>地产</li>
                                <li class="ui-label selected" <empty name="industry.1">style='display: none;'</empty>>时尚</li>
                                <li class="ui-label selected" <empty name="industry.2">style='display: none;'</empty>>财经</li>
                                <li class="ui-label selected" <empty name="industry.3">style='display: none;'</empty>>娱乐</li>
                                <li class="ui-label selected" <empty name="industry.4">style='display: none;'</empty>>婚庆</li>
                                <li class="ui-label selected" <empty name="industry.5">style='display: none;'</empty>>美容</li>
                                <li class="ui-label selected" <empty name="industry.6">style='display: none;'</empty>>汽车</li>
                                <li class="ui-label selected" <empty name="industry.7">style='display: none;'</empty>>艺术</li>
                                <li class="ui-label selected" <empty name="industry.8">style='display: none;'</empty>>教育</li>
                                <li class="ui-label selected" <empty name="industry.9">style='display: none;'</empty>>其他</li>
                            </ul>
                            <div id="clear"></div>
                        </div>
                    </div>
                    
                    <gt name="jsSkill|strlen" value="0">
                    <div class="ui-form-item ui-border-b" >
                        <label>
                            才艺
                        </label>
                    </div>
                    
                    <div class="ui-form-item ui-border-b" style='height: auto;'>
                        <div>
                            <ul class='tag skill'>
                                <li class="ui-label selected" <empty name="skill.0">style='display: none;'</empty>>舞蹈</li>
                                <li class="ui-label selected" <empty name="skill.1">style='display: none;'</empty>>唱歌</li>
                                <li class="ui-label selected" <empty name="skill.2">style='display: none;'</empty>>乐器</li>
                                <li class="ui-label selected" <empty name="skill.3">style='display: none;'</empty>>体育</li>
                                <li class="ui-label selected" <empty name="skill.4">style='display: none;'</empty>>魔术</li>
                                <li class="ui-label selected" <empty name="skill.5">style='display: none;'</empty>>导演</li>
                                <li class="ui-label selected" <empty name="skill.6">style='display: none;'</empty>>书法</li>
                                <li class="ui-label selected" <empty name="skill.7">style='display: none;'</empty>>其他</li>
                            </ul>
                            <div id="clear"></div>
                        </div>
                    </div>
                    </gt>
                    
                    <div class="ui-form-item ui-border-b">
                        <label>
                            年龄
                        </label>
                        <input readonly type="text" placeholder="请输入年龄" value="<if condition="$myPrifile.age eq 0">保密<else/>{$myPrifile.age}</if>" name="age" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" >
                    </div>
<!--                    
                    <gt name="myPrifile.mob|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            联系电话
                        </label>
                        <input readonly type="text" placeholder="请输入联系电话" value="{$myPrifile.mob}" name="mob" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" >
                    </div>
                    </gt>
                    
                    <gt name="myPrifile.qq|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            联系QQ
                        </label>
                        <input readonly type="text" placeholder="请输入联系QQ" value="{$myPrifile.qq}" name="qq" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" >
                    </div>
                    </gt>
                    
                    <gt name="myPrifile.email|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            联系Email
                        </label>
                        <input readonly type="text" placeholder="请输入联系Email" value="{$myPrifile.email}" name="email" >
                    </div>
                    </gt>
                    
                    <gt name="myPrifile.wx|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            联系微信
                        </label>
                        <input readonly type="text" placeholder="请输入联系微信" value="{$myPrifile.wx}" name="wx"  >
                    </div>
                    </gt>-->
                    
                    
                    <div class="ui-form-item ui-border-b">
                        <label>
                            期望酬劳
                        </label>
                        <input readonly type="text"  value="<gt name="myPrifile.price" value="0">{$myPrifile.price}<else/>待商议</gt>" name="price" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" >
               </div>
                    
                    
                    <gt name="myPrifile.style|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            主持风格
                        </label>
                        <input readonly type="text"  value="{$myPrifile.style}" name="style">
                    </div>
                    </gt>
                    
                    <gt name="myPrifile.school|strlen" value="0">
                    <div class="ui-form-item ui-form-item-textarea ui-border-b">
                        <label>
                            毕业学校
                        </label>
                        <textarea readonly  name="school">{$myPrifile.school}</textarea>
                    </div>
                    </gt>
                    
                    <gt name="myPrifile.organization|strlen" value="0">
                    <div class="ui-form-item ui-border-b">
                        <label>
                            所属机构
                        </label>
                        <input readonly type="text"  name="organization" value="{$myPrifile.organization}">
                    </div>
                    </gt>
                    
                    <gt name="myPrifile.info|strlen" value="0">
                    <div class="ui-form-item ui-form-item-textarea" style="height:auto;">
                        <label>
                            个人介绍
                        </label>
                        <textarea readonly="" rows=3 cols=40 style="height:auto;">{$myPrifile.info}</textarea>
                    </div>
                    </gt>
                    </div>
                     <div class="bgw">
                    <gt name="myPrifile.honour|strlen" value="0">
                    <div class="ui-form-item ui-form-item-textarea ui-border-b">
                        <label>
                            曾获荣誉
                        </label>
                        <textarea readonly  name="honour">{$myPrifile.honour}</textarea>
                    </div>
                    </gt>
                  
                    <div class="ui-btn-wrap" style="">
                        
                        <section class="ui-input-wrap">
                            <div class="ui-input ui-border-radius">
                                <input type="text" name="msg" value="" placeholder="输入您想对他/她说的话">
                            </div>
                            <div class="ly_button" id="btn">留言</div>
                        </section>
                    </div>
                   </div>
                    
                    
                    <gt name="countVideo" value="0">
                    <div class="title ui-border-b"><div class="title_biao"></div>宣传视频</div>
                    <div class="bgw">
                                 
                        <ul class="video">
                
                           <div class="cl"></div> 
                        </ul>
                        
                        
                    </div>
                    </gt>
                    
                    <div class="cl"></div>
                    <div style=" font-size:12px; margin-bottom: 8px; text-align:center;" >本信息由开麦主持提供 - 请关注[开麦主持]微信公众号</div>
                   
       
                        <div class="title ui-border-b"><div class="title_biao"></div>宣传视频</div>
                         <div class="bgw">
                        <ul style="padding: 10px 0px;">
                            <foreach name="pics" item="vo">
                                <li><a href="javascript:void();"><img src="{$vo}" width="100%"/></a></li>
                            </foreach>
                            
                        </ul>
                        <div id="clear"></div>
                        
                    </div>
               
                    
                </form>
                
            </div>
            
            
            
            
        </section>
        <div class="ui-loading-block show">
            <div class="ui-loading-cnt">
                <i class="ui-loading-bright"></i>
                <p>正在加载中...</p>
            </div>
        </div>
        <script src="./Public/localResizeIMG/dist/lrz.bundle.js"></script>
        <script>
            $('.show').fadeOut();
            var picNum = 0;
            var videoNum = 0;
            
            
            
           
    {$jsVideos}
             console.log(picNum);                       
            $('.element_id').cxSelect({ 
                url: './Public/pcSelect/cityData.min.js',               // 如果服务器不支持 .json 类型文件，请将文件改为 .js 文件 
                selects: ['province', 'city', 'area'],  // 数组格式，请注意顺序 
                nodata: 'none' 
            }); 
            
            //
            function deletePic(pic,num){
                if(confirm("确定要删除数据吗？"))
                {
                    
                }else{
                    return;
                }
                $('#'+num).remove();
                $('.add').css('display','block');
                $.ajax({
                    cache: true,
                    type: "POST",
                    url:"?m=web&a=profiles",
                    data:{'delete':pic},// 序列号formid
                    dataType: 'json',
                    error: function(request) {
                        
                    },
                    success: function(data) {
                        console.log(data);
                    }
                });
            }
            
            //
            var langArr = new Array();
            {$jsLanguage}
            $("input[name='language']").val(langArr.join("-"));
            $(".language li").click(function () {
                var i = langArr.indexOf($(this).html());
                if(i != -1) {
                    langArr.splice(i, 1);
                    $(this).removeClass("selected");
                }else{
                    langArr[$(this).index()]=$(this).html();
                    $(this).addClass("selected"); 
                }
                $("input[name='language']").val(langArr.join("-"));
            });
            
            var industryArr = new Array();
            {$jsIndustry}
            $("input[name='industry']").val(industryArr.join("-"));
            $(".industry li").click(function () {
                var i = industryArr.indexOf($(this).html());
                if(i != -1) {
                    industryArr.splice(i, 1);
                    $(this).removeClass("selected");
                }else{
                    industryArr[$(this).index()]=$(this).html();
                    $(this).addClass("selected"); 
                }
                $("input[name='industry']").val(industryArr.join("-"));
            });
            
            var skillArr = new Array();
            {$jsSkill}
            $("input[name='skill']").val(skillArr.join("-"));
            $(".skill li").click(function () {
                var i = skillArr.indexOf($(this).html());
                if(i != -1) {
                    skillArr.splice(i, 1);
                    $(this).removeClass("selected");
                }else{
                    skillArr[$(this).index()]=$(this).html();
                    $(this).addClass("selected"); 
                }
                $("input[name='skill']").val(skillArr.join("-"));
            });
            
            $(".addVideo").click(function(){
                
                if (videoNum >= 4) {
                    alert('最多只能添加4个视频');
                    return;
                }
                
                var videoInput = $("input[name='videoInput']").val();
                if (videoInput == '') {
                    alert('视频网址不能为空');
                    return ;
                }
                //
                $.ajax({
                    cache: true,
                    type: "POST",
                    url:"?m=web&a=profiles&action=addvideo",
                    data:{'video':videoInput},// 序列号formid
                    async: false,
                    dataType: 'json',
                    error: function(request) {
                        alert('提交超时，请稍候再试！');
                    },
                    success: function(data) {
                        console.log(data);
                        if (data.error == 0) {
                            alert('发布成功！');
                            window.location.href="?m=web&a=profiles&openid={$Think.get.openid}";
                        }else{
                            alert('提交超时，请稍候再试！');
                        }
                    }
                });
            });
            
            function reviewVideo(video){
                window.location.href=video;
            }
            function previewImage(current,all){
                var additionalStrs= new Array(); //定义一数组 
                    additionalStrs=all.split(",");
                    
                $.each(additionalStrs, function(i,val){
                    if (val != '') {
                        additionalStrs[i] = 'http://'+window.location.host+'/'+val;
                    }
                    
                });
//                console.log(current,all);
                var json = JSON.stringify(additionalStrs);
                
                console.log(current.substr(2),additionalStrs);

                wx.previewImage({
                    current: 'http://'+window.location.host+'/'+current.substr(2),
                    urls: additionalStrs
                  });

            }
            
            $("#btn").click(function(){
                var msg = $("input[name='msg']").val();
                var uid = {$Think.get.uid};
                var id = {$Think.session.id};
                if (msg == '') {
                    alert('内容不能为空');
                    return;
                }
                $.ajax({
                    cache: true,
                    type: "POST",
                    url:"?m=web&a=artistProfiles",
                    data:{'action':'msg','msg':msg,'touid':uid,'fromuid':id},// 序列号formid
                    async: false,
                    dataType: 'json',
                    error: function(request) {
                        alert('提交超时，请稍候再试！');
                    },
                    success: function(data) {
                        console.log(data);
                        if (data.error == 0) {
                            alert('操作成功！');
                        }else{
                            alert(data.msg);
                        }
                    }
                });
            });
            
        </script>
    </body>
</html>